﻿using UGFExtensions.Timer;
using UnityEngine;

namespace Cheng
{
    /// <summary>
    /// 游戏入口。
    /// </summary>
    public partial class GameEntry : MonoBehaviour
    {
        /// <summary>
        /// 构建信息
        /// </summary>
        public static BuiltinDataComponent BuiltinData
        {
            get;
            private set;
        }
        /// <summary>
        /// 时间
        /// </summary>
        public static TimerComponent Timer
        {
            get;
            private set;
        }
        /// <summary>
        /// 血条
        /// </summary>
        public static HPBarComponent HPBar
        {
            get;
            private set;
        }

        public static GamefacadeComponent Gamefacade
        {
            get;
            private set;
        }

        private static void InitCustomComponents()
        {
            // 将来在这里注册自定义的组件
            BuiltinData = UnityGameFramework.Runtime.GameEntry.GetComponent<BuiltinDataComponent>();
            HPBar = UnityGameFramework.Runtime.GameEntry.GetComponent<HPBarComponent>();
            Timer = UnityGameFramework.Runtime.GameEntry.GetComponent<TimerComponent>();
            Gamefacade= UnityGameFramework.Runtime.GameEntry.GetComponent<GamefacadeComponent>();
        }

        private static void InitCustomDebuggers()
        {
            // 将来在这里注册自定义的调试器
        }
    }
}